<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 

<html>
<head>        
	<title><bean:message bundle="appCommonRes" key="dr.listUser.title"/></title>
	<link rel="stylesheet" type="textcss" href='<%=request.getContextPath() + "/cs/css/globalProcess_layout.css"%>' >
	<link rel="stylesheet" type="text/css" href='<%=request.getContextPath() + "/cs/css/globalProcess.css"%>' >
</head>

<body>

<script language="JavaScript">
function setResult() {
  window.opener.clearAdmin();

  size = document.form1.elements.length;
  counter = 0;
  for (var i=0; i<size; i++) {
    if (document.form1.elements[i].checked) {
      value = document.form1.elements[i].value;
      window.opener.setAdmin(value, value, counter);
      counter++;
    }
  }

  self.close();
}
</script>

<table class="zoneFive" cellspacing="0" cellpadding="0" width="100%" border="0" summary="content zone">
<tr>
<td valign=top width="100%">
	  
<div class="generalWrapRight">
<input type="submit" class="inputButton" value="<bean:message bundle="appCommonRes" key="dr.closeWindow"/>" onClick="self.close()">
</div> 
	  
<div class="app_pageSubtitle">
<span class="left"><bean:message bundle="appCommonRes" key="dr.listUser.title"/></span>
<span class="right">&nbsp;</span>
</div>

<form name="form1" >

<table class="dataTable" border="0" cellspacing="1" cellpadding="2" width="100%" summary="<bean:message bundle="appCommonRes" key="dr.reviewerList"/>">
<tr class="listHeader"> 
  <th id="Select" align="center"><bean:message bundle="appCommonRes" key="dr.select"/></th>
  <th id="User Alias" align="left"><bean:message bundle="appCommonRes" key="dr.userAlias"/></th>
  <th id="User Name" align="left" nowrap><bean:message bundle="appCommonRes" key="dr.userName"/></th>
</tr>     
<logic:iterate id="user" name="userView" property="userList" indexId="index">  
<tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
  <td headers="Select" width="10%" align="center"><input type="checkbox" 
  	name="<bean:write name="user" property="userAlias"/>" 
  	value="<bean:write name="user" property="userAlias"/>"></td>
  <td headers="User Alias" width="40%"><bean:write name="user" property="userAlias"/></td>
  <td headers="User Name" width="50%"><bean:write name="user" property="userName"/></td>
</tr>
</logic:iterate>
</table>

<div class="pageButtonWrap" align="right">
<input hspace="40" type="button" name="Submit" class="pageButton" value="<bean:message bundle="appCommonRes" key="dr.done"/>" onClick="setResult()">
</div>

</form>

</td>
</tr>
</tbody>
</table>

</body>
</html>
